package com.ruoyi.common.core.domain.entity;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 安全体系类型对象 t_safetymanage_category
 * 
 * @author ruoyi
 * @date 2021-12-14
 */
public class TSafetymanageCategory extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 唯一ID */
    private Long id;

    /** 编号 */
    private String code;

    /** 类型名称 */
    @Excel(name = "类型名称")
    private String caption;

    /** 父类型ID */
    @Excel(name = "父类型ID")
    private Long parentid;

    /** 父类型名 */
    @Excel(name = "父类型名")
    private String parentname;

    /** 排序 */
    @Excel(name = "排序")
    private Integer sortorder;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createts;

    /** 创建人 */
    @Excel(name = "创建人")
    private Long createdby;

    /** 公司 */
    @Excel(name = "公司")
    private Long companyid;

    private List<TSafetymanageCategory> children = new ArrayList<TSafetymanageCategory>();

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setCaption(String caption) 
    {
        this.caption = caption;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getCaption()
    {
        return caption;
    }
    public void setParentid(Long parentid)
    {
        this.parentid = parentid;
    }

    public Long getParentid()
    {
        return parentid;
    }

    public String getParentname() {
        return parentname;
    }

    public void setParentname(String parentname) {
        this.parentname = parentname;
    }

    public Integer getSortorder() {
        return sortorder;
    }

    public void setSortorder(Integer sortorder) {
        this.sortorder = sortorder;
    }

    public void setCreatets(Date createts)
    {
        this.createts = createts;
    }

    public Date getCreatets() 
    {
        return createts;
    }
    public void setCreatedby(Long createdby) 
    {
        this.createdby = createdby;
    }

    public Long getCreatedby() 
    {
        return createdby;
    }
    public void setCompanyid(Long companyid) 
    {
        this.companyid = companyid;
    }

    public Long getCompanyid() 
    {
        return companyid;
    }

    public List<TSafetymanageCategory> getChildren() {
        return children;
    }

    public void setChildren(List<TSafetymanageCategory> children) {
        this.children = children;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("code", getCode())
            .append("caption", getCaption())
            .append("parentid", getParentid())
            .append("parentname", getParentname())
            .append("sortorder", getSortorder())
            .append("createts", getCreatets())
            .append("createdby", getCreatedby())
            .append("companyid", getCompanyid())
            .toString();
    }
}
